package com.gxa.controller;

import com.gxa.common.R;
import com.gxa.pojo.Receipt_Purchase;
import com.gxa.service.PurchaseService;
import com.gxa.service.SalesQueryService;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

@Controller
@Api(value = "销货记录查询",tags = "销货记录查询接口API")
@RequestMapping("/sales")
public class SalesQueryController {
    @Autowired
    private SalesQueryService salesQueryService;

    @RequestMapping(value = "/querySalesReport",method = RequestMethod.POST)
    @ApiOperation(value = "销货模块的所有查询",notes = "销货货模块查询", response = R.class)
    @ResponseBody
    @ApiResponses({
            @ApiResponse(code=200,message="请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code=500,message="后台服务错误")
    })

    public R querySales(@RequestBody @ApiParam(name = "map",value = "参数集合",required = true)Map map){

        return salesQueryService.querySales(map);
    }
    @RequestMapping(value = "/updateSalesReport",method = RequestMethod.POST)
    @ApiOperation(value = "查询处反审核",notes = "查询处反审核", response = R.class)
    @ResponseBody
    @ApiResponses({
            @ApiResponse(code=200,message="请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code=500,message="后台服务错误")
    })

    public R updateSales(@RequestBody @ApiParam(name = "map",value = "参数集合",required = true)Map map){

        return salesQueryService.updateSales(map);
    }
}
